﻿<?php
require_once('../db/check_login.php');
require_once('../db/config.php');
$db=new db($config);
$role=$db->foundbyWhere('role');
?>

<table width="100%" border="0">
  <tr>
    <td width="12%" align="center">角色ID</td>
    <td  align="center">角色名称</td>
    <td  align="center">操作</td>
  </tr>
  <?php if(!empty($role)&&is_array($role)):?>
  <?php foreach($role as $value): ?>
  <tr>
    <td align="center"><?php echo $value['id']?></td>
    <td align="center"><?php echo $value['name']?></td>
    <td align="center"><a href="powerSet.php?id=<?php echo $value['id']?>">配置权限</a></td>
  </tr>
  <?php endforeach;?>
  <?php else :?>
  
    <td align="center">暂无记录</td>
    <?php endif;?>
</table>
